﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace HovisPresent
{
	public partial class InsertionPointListView : ListView
	{
		public InsertionPointListView() {
			InitializeComponent();
		}

		private int insertionPoint = -1;
		public int InsertionPoint {
			get { return insertionPoint; }
			set { SetInsertionPoint(value); }
		}

		private void SetInsertionPoint(int point) {
			if (point == insertionPoint)
				return;

			if (insertionPoint != -1) {
				Items[insertionPoint].BackColor = SystemColors.Window;
				Items[insertionPoint].ForeColor = SystemColors.WindowText;
			}

			insertionPoint = point;

			if (insertionPoint != -1) {
				Items[insertionPoint].BackColor = Color.Red;
				Items[insertionPoint].ForeColor = Color.White;
			}
		}

	}
}
